<?php
//phpinfo();die;

if (strpos($_SERVER['SERVER_NAME'],"bank.gobanki.ru") !== false){
	header("HTTP/1.1 302 Moved Temporatily");
	header("Location: http://gorabankov.ru{$_SERVER['REQUEST_URI']}");
	die;
}

define("MAIN_DIR",dirname(__FILE__).DIRECTORY_SEPARATOR);
require_once MAIN_DIR.DIRECTORY_SEPARATOR."core".DIRECTORY_SEPARATOR."defines.php";
require_once CORE."settings.php";
require_once CORE."functions.php";
require_once CORE."classes.php";

session_start();

$route = new Router();
$db = new MySQL(DB_HOST,DB_USER,DB_PASSWORD,DB_NAME);

switch ($route->getPath(1)) {
	
	case "":		require_once APP."cities_list.php"; break;
	case "admin":	require_once ADMIN.MAINFILE; break;
	
	default:		require_once APP.MAINFILE;
}

?>